POV-Ray : Newsgroups : povray.binaries.scene-files : A poly 16 file for Le_Forgeron : Re: A poly 16 file for Le_Forgeron Server Time
6 May 2024 08:10:15 EDT (-0400)
  Re: A poly 16 file for Le_Forgeron  
From: Le Forgeron
Date: 16 Dec 2010 13:51:14
Message: <4d0a5fa2@news.povray.org>
Le 16/12/2010 02:14, Jaap Frank nous fit lire :
> I've ask in the Povray Bug Tracking System to raise the maxpower of the
> poly object with one power to 16.
> Le_Forgeron asked me for a genuine poly 16 file to test the system. It's
> attached to this post.

There is a syntax error on line 318. Can you fix it (just post the
corrected line) ?

/*  x^6.y^2.z^4	  */   ,
-12*T6*P4*R4-48*T4*P2*R2*(5*R2+A2)-40*T2*(R2-A2)*R2+3*A2)

Notice the closing parenthesis with no opening.

So far I just tried to raise the limit (easily)... but it render only a
yellow stone and black sky.
I might take more time than expected if I have to found an actual
surface. (oh, well, I might provide a new syntax as well... it's too
late for 3.7 anyway). At least your demo scene confirmed me that a lot
of values are 0.

You are right about the code of binomial(): it is dead. (the array is
used all the time, due to the parser limiting the order)
In fact it is silly computing the binomial coefficient by the absolute
formula b(k,r) = k!/((k-r)! * r!), using optimisation of factoring the
numbers in stacks and removing common parts, to avoid big numbers.
It is also silly, because it try to factor for all odd numbers instead
of just primes. What a waste of modulo computation.

It is far simpler to know that it's the pascal's triangle, with
b(k,r)=b(k-1,r-1)+b(k-1,r) when r>0 and r<k;
b(k,0)=1 as well as b(k,k)=1.

Must have been some "smart" coding of that old time.

32 bits unsigned int can store down to depth 35.
64 bits go down to depth 69.

> 
> If someone else is interested, there is a working poly 8 file too, so
> you can play with a high power object.
> Both files produces spirals that are build from a mathematical described
> distorted Oval Torus (poly 8 and poly 16), followed by chopping up the
> distorted torus in peaces that builds a spiral. No mesh or Isosurface is
> used.
> 
> Jaap Frank


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.